﻿CREATE TABLE [dbo].[ProductCategory] (
    [Id]               UNIQUEIDENTIFIER CONSTRAINT [DF_ProductCategories_Id] DEFAULT (newid()) ROWGUIDCOL NOT NULL,
    [ParentCategoryId] UNIQUEIDENTIFIER NULL,
    [Name]             NVARCHAR (100)   NOT NULL,
    [Description]      NVARCHAR (500)   NULL,
    CONSTRAINT [PK_ProductCategories] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_ProductCategories_ProductCategories] FOREIGN KEY ([ParentCategoryId]) REFERENCES [dbo].[ProductCategory] ([Id])
);

